package com.longai.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Message entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "message", catalog = "longai")
public class Message implements java.io.Serializable {

	// Fields

	private Integer messageId;
	private Integer from;
	private Integer to;
	private String status;
	private Timestamp sendtime;
	private Timestamp receivetime;

	// Constructors

	/** default constructor */
	public Message() {
	}

	/** full constructor */
	public Message(Integer from, Integer to, String status, Timestamp sendtime,
			Timestamp receivetime) {
		this.from = from;
		this.to = to;
		this.status = status;
		this.sendtime = sendtime;
		this.receivetime = receivetime;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "message_id", unique = true, nullable = false)
	public Integer getMessageId() {
		return this.messageId;
	}

	public void setMessageId(Integer messageId) {
		this.messageId = messageId;
	}

	@Column(name = "from")
	public Integer getFrom() {
		return this.from;
	}

	public void setFrom(Integer from) {
		this.from = from;
	}

	@Column(name = "to")
	public Integer getTo() {
		return this.to;
	}

	public void setTo(Integer to) {
		this.to = to;
	}

	@Column(name = "status", length = 7)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "sendtime", length = 19)
	public Timestamp getSendtime() {
		return this.sendtime;
	}

	public void setSendtime(Timestamp sendtime) {
		this.sendtime = sendtime;
	}

	@Column(name = "receivetime", length = 19)
	public Timestamp getReceivetime() {
		return this.receivetime;
	}

	public void setReceivetime(Timestamp receivetime) {
		this.receivetime = receivetime;
	}

}